<!DOCTYPE html>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<head>
    <title>数据编辑</title>
    <link rel="stylesheet" href="../../static/skins_/css/blue/reset.css" type="text/css" />
    <link rel="stylesheet" href="../../static/skins_/css/blue/global.css" type="text/css" />
    <script src="../../static/loadjs1.js"></script>
</head>
<body>
<!--增加过滤器解决恶意html及None问题-->
<%!
def ESC_BLANK(text):
    if text=="None":
        return ""
    else:
        return text
%>
<%page expression_filter="h,ESC_BLANK"/>
<div class="tool_tab">
	<ul>
		<li class="cur"><a href="#">数据修订</a></li>
	</ul>
</div>
<div class="tool_table">
    <div class="button" onclick="doact()"><a href="#" class="button_gray button_icon_check"><b></b>保存</a></div>
    <div class="button" onclick="window.close()"><a href="#" class="button_gray button_icon_del"><b></b>取消</a></div>

</div>
<input type="hidden" rel="v" class="u_ipt_inner"  id="id">
<table class="table">
    <tbody>
    %if i.get("rec",None):
	<tr>
    	<td>银行编号：</td><td><input type="text" rel="v" class="u_ipt_inner" value="${i.get("bankno","")}" id="bankno" readonly style="background-color:#ffdddd"></td>
	</tr>
    %endif
    <tr>
    	<td>归属企业名称：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="incname" readonly onclick="selectinc('incname')" style="background-color:#ffdddd"></td>
	</tr>
	<tr>
    	<td>银行名称：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="bankname"></td>
	</tr>
	<tr>
    	<td>开户地址：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="addressdetail"></td>
	</tr>
	<tr>
    	<td>账号：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="accountno"></td>
	</tr>
	<tr>
    	<td>客户经理姓名：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="customermanager"></td>
	</tr>
	<tr>
    	<td>联系电话：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="managerphoneno"></td>
	</tr>
	<tr>
    	<td>备注：</td><td><input type="text" rel="v" class="u_ipt_inner"  id="bz"></td>
	</tr>
	<tr>
	</tr>
    </tbody>
</table>
<div class="tool_table">
    <div class="button" onclick="doact()"><a href="#" class="button_gray button_icon_check"><b></b>保存</a></div>
    <div class="button" onclick="window.close()"><a href="#" class="button_gray button_icon_del"><b></b>取消</a></div>

</div>
<script type="text/javascript" src="/static/skins_/js/settings.js"></script>
<script>
	$(function(){
	%if i.get("rec",None):
		$("#id").val("${i.rec.get("id","")}");
		$("#bankno").val("${i.rec.get("bankno","")}");
		$("#bankname").val("${i.rec.get("bankname","")}");
		$("#addressdetail").val("${i.rec.get("addressdetail","")}");
		$("#accountno").val("${i.rec.get("accountno","")}");
		$("#customermanager").val("${i.rec.get("customermanager","")}");
		$("#managerphoneno").val("${i.rec.get("managerphoneno","")}");
		$("#bz").val("${i.rec.get("bz","")}");
        $("#incname").val("${i.rec.get("incname","")}");
	%endif
	});

     /**
     * 选择单位
     */
    function selectinc(targetId){
        var v=showModal('/f00/f0099/list?act=inc',480,272);
        $("#"+targetId).val(v.incname);
    }

    function doact(){
        var rv={};
        $("[rel='v']").each(function(){
            rv[$(this).attr("id")]=$(this).val();
        });
        rv.status="ok";
        window.returnValue=rv;
        window.close();
    }
</script>
</body>
</html>